<?php

/*
 * EachGo电商网站 新媒体
 * www.eachgo.cn
 */

namespace Home\Model;

/**
 * OrderCommentInfo
 * 请输入描述
 * @author Moon
 */
use Think\Model;

class OrderCommentInfoModel extends Model {
    /*
     * 增加一条记录
     */

    public function addOrderCommentInfo($obj) {
        $res = $this->add($obj);
        return $res;
    }

    /*
     * 删除一条记录
     */

    public function deleteOrderCommentInfo($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->delete();
        return $res;
    }

    /*
     * 更新一条记录
     */

    public function updateOrderCommentInfo($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->save($obj);
        return $res;
    }

    /*
     * 查询记录 by 时间
     */

    public function selectOrderCommentInfoByTime($obj) {
        $res = $this->where('date = "' . $obj['date'] . '"')->select();
        return $res;
    }

    /*
     * 查询记录 by ID
     */

    public function selectOrderCommentInfoByID($obj) {
        $res = $this->where('ID = "' . $obj['ID'] . '"')->select();
        return $res;
    }

    /*
     * 查询记录 by OrderID
     */

    public function selectOrderCommentInfoByOrderId($obj) {
        $res = $this->where('order_Detailed_Info_ID = "' . $obj['order_Detailed_Info_ID'] . '"')->select();
        return $res;
    }

    /*
     * 查询记录 by user_ID
     */

    public function selectShareCommentInfoByUserId($obj) {
        $res = $this->where('user_ID = "' . $obj['user_ID'] . '"')->select();
        return $res;
    }

}
